﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Windows.Media.Imaging;
using Microsoft.Phone.Tasks;
using Microsoft.Advertising.Mobile.UI;
using Common.Library;
using OnlineVideos.Common;
using System.Xml.Linq;
using OnlineVideos.Data;
using OnlineVideos.UI;
using OnlineVideos.Utilities;
using Common.Utilities;
namespace CommonControls
{
    public partial class Upgrade : PhoneApplicationPage
    {
        public static ImageBrush Povitbg = null;


        public Upgrade()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(Upgrade_Loaded);
           PageHelper.LoadAdControl(LayoutRoot, adstackpl, 3);
            imgTitle.Source = ResourceHelper.getPivotTitle();
        }

        void Upgrade_Loaded(object sender, RoutedEventArgs e)
        {
            LayoutRoot.Background = ImageHelper.LoadPivotBackground();
            lbxupgrade.ItemsSource = OnlineShow.GetUpgrade();
        }

        private void getapp_Click(object sender, RoutedEventArgs e)
        {
            if (AppResources.ShowUpgradePage)
            {
                WebBrowserTask w = new WebBrowserTask();
                w.Uri = AppResources.UpgradeAppLink;
                w.Show();
            }
        }

        private void cancel_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.GoBack();
        }

        private void imgTitle_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            NavigationService.Navigate(NavigationHelper.MainPanoramaPage);
        }
    }
}